<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
	    <div class="btn-toolbar">
	    	<button class="btn btn-primary ifrm" data-url="/sysmsg/addPush" data-width="720" data-height="580" data-title="添加消息" data-params="" style="position:relative;float:right;padding:3px 6px;margin-right:10px">添加推送消息</button>
		    <form>
		    	<label style="display: inline;">推送标题：</label><input class="input input-medium" type="text" value="<?=I('get.push_title')?>" name="push_title"/>
		    	<label style="display: inline;margin-left: 15px;">推送类型：</label><select name="push_type" id="" style="width: 100px;"><option value="all">全部</option><option value="0">所有用户</option><option value="1">指定用户</option></select>
		    	<label style="display: inline;margin-left: 15px">消息ID：</label><input class="input input-medium" type="text" value="<?=I('get.push_id')?>" name="push_id"  style="width: 100px;"/>
		    	<label style="display: inline;margin-left: 15px">时间：</label><input readonly name="stime" class="input input-medium" onclick='WdatePicker({dateFmt:"yyyy-MM-dd HH:mm"})' type="text" placeholder="开始时间" value="<?=I('get.stime')?>" />&nbsp;
                <input readonly style="margin-left:10px" name="etime" placeholder="结束时间" class="input input-medium" onclick='WdatePicker({dateFmt:"yyyy-MM-dd HH:mm"})' type="text" value="<?=I('get.etime')?>" />
		    	<input type="hidden" value="<?=I('get.res')?>" name="res" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>
		    </form>
		</div>
		<hr>
		<table class="table">
		      <thead>
		        <tr>
		          <th style="text-align:center">序号</th>
		          <th style="text-align:center">推送标题</th>
		          <th style="text-align:center">推送内容</th>
		          <th style="text-align:center">点击后操作</th>
		          <th style="text-align:center">推送类型</th>
		          <th style="text-align:center">添加时间</th>
				  <th style="text-align:center">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($data){foreach($data AS $key=>$val){ ?>
		        <tr>
		          <td style="text-align:center;"><?=$val['push_id']?></td>
		          <td style="text-align:center;"><?=$val['push_title']?></td>
		          <td style="text-align:center;"><?=$val['push_content']?></td>
		          <td style="text-align:center;"><?=$val['push_after']?></td>
		          <td style="text-align:center;"><?=$val['push_type']?'指定用户':'所有用户'?></td>
		          <td style="text-align:center;"><?=date('Y-m-d H:i',$val['add_at'])?></td>
				  <td style="text-align:center;">
				  <a class="btn btn-danger decate" href="/sysmsg/delPush/id/<?=$val['push_id']?>" style="padding: 0px 4px;" data-title="删除推送信息" ><i class="icon-remove"></i></a></td>
		        </tr>
		        <?php }}else{?>
		        <td style="text-align:center;" colspan=8>暂无数据</td></tbody>
		        <?php }?>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('.decate').live('click',function(){
		if(!window.confirm('确认删除该消息吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
})
</script>